﻿using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace DHJ.Cost.Tasks
{
    public interface IBatchManager
    {
        /// <summary>
        /// 全部的条码,Including Task
        /// </summary>
        /// <returns></returns>
        IQueryable<Batch> Batches();

        /// <summary>
        /// 获取指定的条码
        /// </summary>
        /// <returns></returns>
        Task<Batch> GetBatchById(string batchId);

        /// <summary>
        /// 获得部组件的全部装配关系，不考虑装配数量
        /// </summary>
        /// <returns></returns>
        Task<List<AssemRel>> GetAssemRelsAsync(string batchId);

        /// <summary>
        /// 获得构成部组件的全部零件的装配关系和数量
        /// </summary>
        /// <returns></returns>
        Task<List<FlatAssemRel>> GetFlatAssemRelsAsync(IBatchIdentifier batch);
    }
}